﻿@inherits OBUCare.Web.Infrastructure.HelperPage
@using System.Web.Mvc
@using System.Web.Mvc.Html




@*@helper CreateHtmlDropdownList(string fieldName, string fieldTitle, bool required, bool disabled,object value, IEnumerable<System.Web.Mvc.SelectListItem> dataSource)
    {   
        if (value != null)
        {
            var result = dataSource.FirstOrDefault(v => v.Value.Equals(value.ToText()));

            if (result != null)
            { result.Selected = true; }
        }   
        
    <table style="@UIHelper.FieldTableStyle">
        <tr>
            <td style="@UIHelper.LableStyle" class="editor-label">
                @ShowRequiredLable(required)
                @Html.Label(fieldName, fieldTitle.GetFieldLableText())
            </td>
            @Space()
            <td style="@UIHelper.EditorStyle" class="editor-field">
                @if(disabled){
                @Html.DropDownList(fieldName, dataSource, new { id = fieldName, disabled="true", @class = DMSValidationHelper.GetValidationCssClass(fieldTitle, required) })                
                    }
                    else                    
                    {
                @Html.DropDownList(fieldName, dataSource, new { id = fieldName, @class = DMSValidationHelper.GetValidationCssClass(fieldTitle, required) })                
                    }
                @Html.ValidationMessage(fieldName)
            </td>
        </tr>
    </table>
    
}*@